 

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

// set NOISY_TEST to 0 to remove printfs from output
#define NOISY_TEST 1

int main() {
    int i;
    int seed = 1000;
    int numPlayer = 6;
    int maxBonus = 10;
    int p, r, handCount;
    int bonus;
    int k[10];
// = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};
    struct gameState G;
    int maxHandCount = 5;
    // arrays of all coppers, silvers, and golds
    int playercounter = 0; //variable to count the number of cards in people's hands
	

    printf ("TESTING updateCoins():\n");
    for (p = 0; p < numPlayer; p++)
    {
        for (handCount = 1; handCount <= maxHandCount; handCount++)
        {
            for (bonus = 0; bonus <= maxBonus; bonus++)
            {
#if (NOISY_TEST == 1)
                printf("Test player %d with %d treasure card(s) and %d bonus.\n", p, handCount, bonus);
#endif
				playercounter = 0;
                memset(&G, 23, sizeof(struct gameState));   // clear the game state
                r = initializeGame(numPlayer, k, seed, &G); // initialize a new game
				
				for (int i = 0; i <numPlayer; ++i)
					{playercounter += G.handCount[p];
					playercounter += G.deckCount[p];
					playercounter += G.discardCount[p];}

///checks the number of cards the player has against their full deck					
				assert(playercounter == fullDeckCount(p, G.hand[p], &G)); 
				
				
				
				
				
#if (NOISY_TEST == 1)
                printf("All player's discount count match at initialization");
#endif
            }
        }
    }

    printf("All tests passed!\n");

    return 0;
}
